/*******************************************************************************
 * Copyright (c) 2007 University of Oslo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     University of Oslo - initial API and implementation
 *******************************************************************************/

package com.cea.papyrus.diagram.sequence.sedi.editor;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.gef.requests.CreationFactory;

/**
 * This factory class is called by the palette tools to create model
 * objects. Each factory instance knows how to create a specific UML model
 * element.
 * 
 * <p>SeDi is designed so that UML element instances are not created 
 * until they are actually needed (a create request has actually been
 * issued by the user). The creation is performed by appropriate
 * Create commands in the model package. This factory therefore doesn't
 * need to do create anything. It is sufficient that it just remembers 
 * the metaclass (which is used to select the correct CreateHandler
 * class).</p>
 * 
 * @author Andreas Limyr
 * @author frankd@ifi.uio.no
 */
public class SeDiEditorToolFactory implements CreationFactory {

	/** Identifies the UML class to be created by this instance. */
	private final EClass umlClass;
	
	public SeDiEditorToolFactory(final EClass umlClass) {
		this.umlClass = umlClass;
	}
	
	public Object getNewObject() {
		return umlClass;
	}

	public Object getObjectType() {
		return umlClass;
	}
}

